<?php defined('SYSPATH') or die('No direct script access.');
 
class Model_Ateam extends ORM {
	protected $_table_name = 'team';

    public function params() {
        return array(
        	'model' => 'Ateam',
        	'table' => 'team',
            'fields' => array(
                'fio' => array(
                    'title' => 'ФИО',
                    'name' => 'fio',
                    'type' => 'text',
                ),
                'fio_en' => array(
                    'title' => 'ФИО (en)',
                    'name' => 'fio_en',
                    'type' => 'text',
                ),
                'post' => array(
                    'title' => 'Должность',
                    'name' => 'post',
                    'type' => 'text',
                ),
                'post_en' => array(
                    'title' => 'Должность (en)',
                    'name' => 'post_en',
                    'type' => 'text',
                ),
                'image' => array(
                    'title' => 'Фото',
                    'name' => 'image',
                    'type' => 'image',
                    'image_params' => array(
                        'handling' => 'resize',
                        'resize_type' => Image::WIDTH,
                        'width' => '80',
                        'height' => '80',
                        'dir' => $_SERVER['DOCUMENT_ROOT'].'/static/uploads/team/',
                        'url' => URL::base().'static/uploads/team/',
                    )
                ),
            ),
            'main_title' => 'Команда',
            'waymark' => 'fio',
            'sortable' => TRUE,
            'order' => array(
                'field' => 'sort',
                'method' => 'DESC'
            )
        );
    }

}